package test2;

import java.io.File;
import java.io.FileInputStream;

public class test {
    public static void main(String[] args){
        File f=new File("d:\\hsp.txt");
        try {
            FileInputStream fis = new FileInputStream(f);
            byte[] bytes=new byte[1024];
            int n=0;
            while((n=fis.read(bytes))!=-1){
                String s=new String(bytes,0,n);
                System.out.println(s);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
